package dljk.core;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

/**
 *
 * @author vova
 */
public class BGRenderer {

    public void renderBackground(int nWidth, int nHeight, Graphics g) {
        Graphics2D g2 = (Graphics2D) g;

        g.setColor(Color.DARK_GRAY);
        g2.fillRect(0, 0, nWidth, nHeight);

        g.setColor(Color.MAGENTA);
        for (BoardField bf : BoardField.values()) {
            g2.drawRoundRect(GamePanel.getPanelX(bf), GamePanel.getPanelY(bf), CardRenderer.iCARD_WIDTH - 1, CardRenderer.iCARD_HEIGHT - 1, 20, 20);
            g2.drawRoundRect(GamePanel.getPanelX(bf) + 1, GamePanel.getPanelY(bf) + 1, CardRenderer.iCARD_WIDTH - 3, CardRenderer.iCARD_HEIGHT - 3, 20, 20);
        }
    }
}
